public class Time {
    private int hour;
    private int minute;
    private int second;

    public static void main(String args[]) {
        Time t1 = new Time();
        Time t2 = new Time(555550000);
        t1.printTime();
        t2.printTime();
    }

    public Time() {
        this(System.currentTimeMillis());
    }

    public Time(long elapsedTime) {
        setTime(elapsedTime);
    }

    public Time(int hour, int minute, int second) {
        this.hour = hour;
        this.minute = minute;
        this.second = second;
    }

    public int getHour() {
        return hour;
    }

    public int getMinute() {
        return minute;
    }

    public int getSecond() {
        return second;
    }

    public void setTime(long elapsedTime) {
        long elapsedSecsToday = elapsedTime / 1000 % 86400;
        hour = (int) (elapsedSecsToday / 3600 + 8);
        int tmp = (int) (elapsedSecsToday % 3600);
        minute = tmp / 60;
        second = tmp % 60;
    }

    public void printTime() {
        System.out.println(hour + ":" + minute + ":" + second);
    }
}